<?php
/**
 * Default Layout
 *  
 * @author
 * @version
 */

//echo $this->doctype(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<?php
$loginUser = BaseUtil::getLoginUser();
$url = Zend_Controller_Front::getInstance()->getBaseUrl();
$config = Zend_Registry::get("config");
echo $this->headTitle($this->title);
?>
    <link rel="shortcut icon" href="<?php echo $url;?>/favicon.ico"></link>
    <link href="<?php echo $url;?>/styles/style.css" rel="stylesheet" type="text/css"></link>
    <link href="<?php echo $url;?>/styles/cssmenu.css" rel="stylesheet" type="text/css"></link>
    <link href="<?php echo $url;?>/styles/dbgrid.css" rel="stylesheet" type="text/css"></link>
    <link href="<?php echo $url;?>/styles/jquery.ui.css" rel="stylesheet" type="text/css"></link>
    <link href="<?php echo $url;?>/styles/jquery.alerts.css" rel="stylesheet" type="text/css"></link>
	<?php
            if (! empty($this->link)) {
                foreach ($this->link as $link) {
                    echo ('<link href="' . $url . '/styles/' . $link . '" rel="stylesheet" type="text/css"></link>');
                    echo "\n\r";
                }
            }
        ?>
	
    <script type="text/javascript" src="<?php echo $url;?>/scripts/lib/jquery.js"></script>
    <script type="text/javascript" src="<?php echo $url;?>/scripts/lib/ui.core.js"></script>
    <script type="text/javascript" src="<?php echo $url;?>/scripts/lib/ui.draggable.js"></script>
    <script type="text/javascript" src="<?php echo $url;?>/scripts/lib/jquery.alerts.js"></script>
    <script type="text/javascript" src="<?php echo $url;?>/scripts/dbgrid/jquery-ui-datepicker.js"></script>
    <script type="text/javascript" src="<?php echo $url;?>/scripts/common.js"></script>
    <script type="text/javascript" src="<?php echo $url;?>/scripts/dbgrid/dbgrid.js"></script>
    <script type="text/javascript" src="<?php echo $url;?>/scripts/leftnav.js"></script>
    <script type="text/javascript" src="<?php echo $url;?>/scripts/validationUtil.js"></script>
	<?php
if (! empty($this->script)) {
    foreach ($this->script as $script) {
        echo ('<script type="text/javascript" src="' . $url . '/scripts/' . $script . '"></script>');
        echo "\n\r";
    }
}
?>

<!--[if gt IE 6]>
<style type="text/css" media="screen">
#menu ul li{float:left;width: 100%;}
</style>
<![endif]-->
<!--[if lt IE 7]>
<style type="text/css" media="screen">
 body{behavior:url(<?php echo HttpUtil::baseUrl();?>/styles/csshover3.htc);
		font-size:100%; /* to enable text resizing in IE */
	}
#menu{float:none;} 
#menu ul li{float:left;}
#menu h2, #menu a{height:1%;} 

</style>
<![endif]-->
<!-- End Grab This -->
</head>

<body>
<!-- header -->
<div class="header">
    <div class="header_logo"><img src="//pi.<?php echo $config->domain; ?>/logo.png" /></div>
    <div class="header_right"><span style="cursor:pointer;" onclick="javascript:Common.gotoUrl('<?php echo $url; ?>/acl/admin/editinfo');"><?php echo $loginUser['uname']; ?></span> [ <a href= "<?php echo $url . "/acl/admin/logout" ; ?>"><?php echo $this->translate("logout"); ?></a> ]</div>
    <div class="clear"></div>
    <div class="header_right_line"></div>
    <div class="center_menu">
      <div id="menu">
        <!-- admin -->
        <ul>
          <li>
            <h3><?php echo $this->translate("mAdmin"); ?></h3>
            <ul>
              <?php echo ZendFormUtil::aaMenu("acl", "index", $url . "/acl/acl", $this->translate("mRoleMan")); ?>
              <?php echo ZendFormUtil::aaMenu("department", "index", $url . "/department/department", $this->translate("mDepMan")); ?>
              <?php echo ZendFormUtil::aaMenu("admin", "index", $url . "/acl/admin", $this->translate("mAdminMan")); ?>              
            </ul>
          </li>
        </ul>
        <!-- sale -->
        <ul>
          <li>
            <h3><?php echo $this->translate("mSale"); ?></h3>
            <ul>
              <?php echo ZendFormUtil::aaMenu("order", "index", $url ."/order/order" ,$this->translate("mOrderMan")); ?>
              <?php echo ZendFormUtil::aaMenu("order", "index", $url ."/order/order/return" ,$this->translate("mReturnMan")); ?>
            </ul>
          </li>
        </ul>
        <!-- inventory -->
        <ul>
          <li>
            <h3><?php echo $this->translate("mInventory"); ?></h3>
            <ul>
              <?php echo ZendFormUtil::aaMenu("set", "index", $url ."/metadata/set" ,$this->translate("mMetadataSetMan")); ?>
              <?php echo ZendFormUtil::aaMenu("category", "index", $url ."/inventory/category" ,$this->translate("mCatgoryMan")); ?>
              <?php echo ZendFormUtil::aaMenu("product", "index", $url . "/inventory/product" , $this->translate("mProductMan")); ?>
            </ul>
          </li>
        </ul>
        <!-- customer -->
        <ul>
          <li>
            <h3><?php echo $this->translate("mCustomer"); ?></h3>
            <ul>
              <?php echo ZendFormUtil::aaMenu("customer", "index", $url ."/customer/customer/list" ,$this->translate("mCustomerMan")); ?>
              <?php echo ZendFormUtil::aaMenu("agent", "showapply", $url ."/customer/agent/showapply" ,$this->translate("mCampusAgentApply"));?>
              <?php echo ZendFormUtil::aaMenu("campus", "index", $url ."/customer/campus" ,$this->translate("mCampusManagement"));?>
              <?php echo ZendFormUtil::aaMenu("tradelog", "index", $url ."/trade/tradelog" ,$this->translate("mTradelog"));?>
            </ul>
          </li>
        </ul>
        <!-- promotions -->
        <ul>
          <li>
            <h3><?php echo $this->translate("mPromotion"); ?></h3>
            <ul>
              <?php echo ZendFormUtil::aaMenu("promotion", "saleprice", $url ."/promotion/promotion/saleprice" ,$this->translate("mSalrPricePromotionMan")); ?>
              <?php echo ZendFormUtil::aaMenu("promotion", "shipping", $url ."/promotion/promotion/shipping" ,$this->translate("mShippingPromotionMan")); ?>
              <?php echo ZendFormUtil::aaMenu("promotion", "coupon", $url ."/promotion/promotion/coupon" ,$this->translate("mCouponPromotionMan")); ?>
              <?php echo ZendFormUtil::aaMenu("promotion", "specialname", $url ."/promotion/promotion/specialname" ,$this->translate("mSpecialPromotionMan")); ?>
              <?php echo ZendFormUtil::aaMenu("promotion", "special", $url ."/promotion/promotion/special" ,$this->translate("mSpecialNamePromotionMan")); ?>              
            </ul>
          </li>
        </ul>
        <!-- supplyment -->
        <ul>
          <li>
            <h3><?php echo $this->translate("mSupplyment"); ?></h3>
            <ul>
              <?php echo ZendFormUtil::aaMenu("supplement", "online", $url ."/trade/supplement/online" ,$this->translate("mOnlineSupplyment")); ?>
              <?php echo ZendFormUtil::aaMenu("supplement", "offline", $url ."/trade/supplement/offline" ,$this->translate("mOfflineSupplyment")); ?>
              <?php echo ZendFormUtil::aaMenu("supplement", "index", $url ."/trade/supplement" ,$this->translate("mOfflineApplySupplyment")); ?>            
            </ul>
          </li>
        </ul>  
        <ul>
          <li>
            <h3><?php echo $this->translate("mWithdraw"); ?></h3>
            <ul>
              <?php echo ZendFormUtil::aaMenu("withdraw", "searchline", $url ."/trade/withdraw/searchline" ,$this->translate("mOnlineWithdraw")); ?>
              <?php echo ZendFormUtil::aaMenu("withdraw", "searchlinewait", $url ."/trade/withdraw/searchlinewait" ,$this->translate("mOnlineWaitWithdraw")); ?>
              <?php echo ZendFormUtil::aaMenu("withdraw", "searchoffline", $url ."/trade/withdraw/searchoffline" ,$this->translate("mOfflineWithdraw")); ?>     
              <?php echo ZendFormUtil::aaMenu("withdraw", "searchofflinewait", $url ."/trade/withdraw/searchofflinewait" ,$this->translate("mOfflineWaitWithdraw")); ?>                     
            </ul>
          </li>
        </ul>     
        <ul>
          <li>
            <h3><?php echo $this->translate("mSaleManagement"); ?></h3>
            <ul>
              <?php echo ZendFormUtil::aaMenu("consult", "index", $url ."/consult/consult/index" ,$this->translate("mConsultManagement")); ?>
              <?php echo ZendFormUtil::aaMenu("customer", "usercommentslist", $url ."/customer/customer/usercommentslist" ,$this->translate("mCommentManagement")); ?>
            </ul>
          </li>
        </ul> 
         <ul>
          <li>
            <h3><?php echo $this->translate("mExchangeCenter"); ?></h3>
            <ul>
              <?php echo ZendFormUtil::aaMenu("gift", "index", $url ."/gift/gift" ,$this->translate("mGiftManagement"));  ?>
              <?php echo ZendFormUtil::aaMenu("applygiftlog", "index", $url ."/gift/applygiftlog" ,$this->translate("mApplyGiftLog"));  ?>
            </ul>
          </li>
        </ul>                   
      </div>
    </div>
  </div>
  <div class="clear"></div>
<!-- header end-->
<div id="contentForm">
<?php
echo $this->layout()->content?>
</div>

<!-- footer -->
<div class="footer"><?php echo $this->translate("footer"); ?></div>
<!-- footer end -->
</body>

</html>



